package com.kaka.TheSingletonPattern;

public class User1 {
    //懒汉式
    private static User1 user1;

    private User1() {
    }

    public static User1 getInstance() {
        if (user1 == null) {
            user1 = new User1();
        }
        return user1;
    }
}
